using System;

namespace newtelligence.DasBlog.Web.Core.Config
{
    /// <summary>
    /// Defines essentially filepaths and methods for the core functionality.
    /// </summary>
    public static class CoreFilePaths
    {
        /// <summary>
        /// Returns a string with the path to the "Access Denied"-Page.
        /// </summary>
        public static String AccessDenied
        {
            get { return CoreFolderNames.SiteConfig + "/" + CoreFileNames.AccessDenied; }
        }

        /// <summary>
        /// Returns a string with the path to the blogroll-opml-file.
        /// </summary>
        public static String BlogrollOpml
        {
            get { return SiteUtilities.MapPath(CoreFolderNames.SiteConfig + "\\" + CoreFileNames.BlogrollOpmlFile); }
        }

        /// <summary>
        /// Returns a string with the path to the blogroll-xslt-file.
        /// </summary>
        public static String BlogrollXslt
        {
            get { return SiteUtilities.MapPath(CoreFolderNames.SiteConfig + "\\" + CoreFileNames.BlogrollXsltFile); }
        }

        /// <summary>
        /// Returns a string with the path to the LiveCommentPreview-Javascript.
        /// </summary>
        public static String LiveComments
        {
            get { return CoreFolderNames.Scripts + "/" + CoreFileNames.LiveCommentPreview; }
        }

        /// <summary>
        /// Returns a string for the FormatPage-functionality.
        /// </summary>
        /// <param name="filename">The filename of the page for FormatPage.</param>
        /// <returns>A string with the path to the FormatPage and the filename as parameter.</returns>
        public static String FormatPage(String filename)
        {
            return "~/" + CoreFileNames.FormatPage + "?path=" + filename;
        }
    }
}